<?php

        $folder = mysql_escape_string($_GET['folder']);
        $file = mysql_escape_string($_GET['file']);
        $fileEncode = sha1($file);
        //$file_name = urldecode($file);
        //$file = $file_name.".".end($name);
           
        //$encodeDOWI_PATH = sha1($file_name);
                
        $file_path = "uploads/".$folder."/".$fileEncode;
        //$file_path = "uploads/".$folder."/".$encodeDOWI_PATH;
       //echo $file_path;die;
        header("Content-Type: application/octet-stream");
        
        header("Content-Encoding: utf-8");
        
        header("Content-disposition:attachment; filename=" . urlencode($file) );
        readfile($file_path);
        exit;